package satir.card.factory;

import org.json.JSONException;
import satir.card.Card;
import satir.card.SkipToolCard;

/**
 * A factory for creating SkipToolCard objects.
 * 
 * @version 2.0 March 2012
 * @author Chris Chan
 */
public class SkipToolCardFactory extends CardFactory{
	
	/**
	 * Break down the structure of cardJson to retrieve required data
	 * And then create SkipToolCard
	 * @return Instance of SkipToolCard
	 */
	@Override
	public Card createCard() {
		String name = "";
		String targetCard = "";
		try {
			targetCard = cardJson.getString("targetCard");
			name = cardJson.getString("name");
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return new SkipToolCard(name, targetCard);
	}

}
